/*  -*- mode: c++; coding: utf-8; c-file-style: "stroustrup"; -*-

    Copyright 2008 Asier Aguirre <asier.aguirre@gmail.com>
    This file is part of Intromit.

    Intromit is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Intromit is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Intromit.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef PYTHON_METHODS_HH
#define PYTHON_METHODS_HH

/* python_methods class */
class python_methods
{
    int poly_function;
    int sample_int;
    double sample_double;

public:
    python_methods();
    ~python_methods();

    // void function
    void sample_void();

    // add function: take two arguments and return the sum of the same type
    int add_int(int x, int y);
    unsigned add_unsigned(unsigned x, unsigned y);
    short add_short(short x, short y);
    unsigned short add_ushort(unsigned short x, unsigned short y);
    char add_char(char x, char y);
    unsigned char add_uchar(unsigned char x, unsigned char y);
    long long add_longlong(long long x, long long y);
    unsigned long long add_ulonglong(unsigned long long x, unsigned long long y);
    float add_float(float x, float y);
    double add_double(double x, double y);

    // polymorfism tests and return values
    static int sample_poly();
    void sample_poly(int i, int j=-1);
    int sample_poly(char c1, char c2, char c3, float f, double d);
    long long sample_poly(float f);
    double sample_poly(double d1, double d2);

    // unary operators
    int operator+();
    int operator-();
    int operator~();
    int operator!();
    int operator&();
    int operator++();    // prefix
    int operator--();
    int operator++(int);
    int operator--(int);

    // binary operators
    int operator+(int right);
    int operator-(int right);
    int operator*(int right);
    int operator/(int right);
    int operator%(int right);
    int operator^(int right);
    int operator&(int right);
    int operator|(int right);
    int operator<<(int right);
    int operator>>(int right);
    int operator=(int right);
    int operator+=(int right);
    int operator-=(int right);
    int operator*=(int right);
    int operator/=(int right);
    int operator%=(int right);
    int operator^=(int right);
    int operator&=(int right);
    int operator|=(int right);
    int operator<<=(int right);
    int operator>>=(int right);
    int operator==(int right);
    int operator!=(int right);
    int operator<(int right);
    int operator>(int right);
    int operator<=(int right);
    int operator>=(int right);
    int operator&&(int right);
    int operator||(int right);

    // parameters by reference
    int sample_reference(int &i, float &f, double &d);

    // return by reference
    int &refret_int();
    double &refret_double();
};

#endif
